{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "initial_id",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "!pip install ultralytics"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e4473745b91f628d",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "import ultralytics\n",
    "ultralytics.checks()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1fc787e0eb7db9d8",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!pip install numpy opencv-python pillow pandas matplotlib seaborn tqdm wandb seedir emoji -i https://pypi.tuna.tsinghua.edu.cn/simple"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3064cb0be3df2ce7",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!find . -iname '__MACOSX'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "19154aaf541bed52",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!find . -iname '.DS_Store'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "24c21df92e5b420b",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!find . -iname '.ipynb_checkpoints'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "159cebb4e3fdb64f",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!for i in `find . -iname '__MACOSX'`; do rm -rf $i;done"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e429eb405646e3f1",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!for i in `find . -iname '.DS_Store'`; do rm -rf $i;done"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f83873b169e249bc",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!for i in `find . -iname '.ipynb_checkpoints'`; do rm -rf $i;done"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b8db2e3ab9faf79a",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!find . -iname '__MACOSX'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a6067ce0d6ec612d",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!find . -iname '.DS_Store'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b6b5f50f01511f0f",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!find . -iname '.ipynb_checkpoints'"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9c463a8e3b0289ae",
   "metadata": {},
   "source": [
    "# 训练模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "cb93749befe98bfb",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!yolo pose train data=ecare_emotion.yaml model=yolov11n.pt pretrained=False project=ecare_emotion name=ecare_emotion_yolo11n epochs=200 batch=16 device=0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f60099c9e1d8b749",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!yolo pose train data=ecare_emotion.yaml model=yolov11s.pt pretrained=False project=ecare_emotion name=ecare_emotion_yolo11s epochs=200 batch=16 device=0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "afdf39c3-b558-466f-90cf-3e997d78f5f1",
   "metadata": {},
   "outputs": [],
   "source": [
    "!yolo pose train data=ecare_emotion.yaml model=yolov11n.pt pretrained=False project=ecare_emotion name=ecare_emotion_yolo11n epochs=200 batch=16 device=0 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e06147205309cad9",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!yolo pose train data=ecare_emotion.yaml model=yolov11m.pt pretrained=False project=ecare_emotion name=ecare_emotion_yolo11m epochs=200 batch=16 device=0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "40946f32daea36e0",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!yolo pose train data=ecare_emotion.yaml model=yolov11l.pt pretrained=False project=ecare_emotion name=ecare_emotion_yolo11l epochs=200 batch=16 device=0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "402ee57f53ec1892",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "!yolo pose train data=ecare_emotion.yaml model=yolov11x.pt pretrained=False project=ecare_emotion name=ecare_emotion_yolo11x epochs=200 batch=16 device=0"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
